function msg = f4d_simple(img)
    % F4D_SIMPLE  Extract message using F4.
    
    r = int16(im2vec(img, [8 8])');    
    [M,N] = size(r);
    bin = zeros(1,M*N);

    % get all LSB
    count = 1;
    for i=1:M
        for j=2:N
            u = r(i,j);
            if (u ~= 0)
                if u > 0
                    bin(count) = mod(u,2);
                else
                    bin(count) = 1 - mod(u,2);
                end
                count = count + 1;
            end
        end
    end
    
    count = count - 1;
    
    % output
    msg = binaryToArray(bin, count);
    fprintf(1,'recovered message is: %s\n',msg);
end
